/**
 * 自定义表单模板-scss
 * @author AndyPan
 * @createdate 2018年11月26日17:16:16
 */

 @import '../../sass/base.scss';

 ::ng-deep .ant-select{
    &.custom-form-select{
        width: 100%;
    }
}

.form-modal{
    width: 91%;
    height: 100px;
    margin: 0 auto;
    .form-tip{
        width: 100%;
        text-align: left;
        color: #F00;
        font-size: 12px;
        margin-bottom: 10px;
    }
    .form-remark{
        line-height: 22px;
        resize: none;
        outline: none;
    }
    &.theme-white{
        color: #FFF;
    }
}

$rowHeight: 32px;
.form-rows{
    width: 100%;
    min-height: $rowHeight;
    // margin: 15px auto;
    margin: 10px auto;
    position: relative;
    display: inline-block;

    &.min{
        margin: 5px auto;
    }
    &.none{
        margin: 0px auto;
    }
    &.auto{
        .rows-lab{
            width: auto;
        }
        .rows-inp{
            position: static;
            margin-left: 5px;
        }
    }
    &.bold{
        .rows-lab{
            font-weight: bold;
            font-size: 14px;
        }
    }

    .upload-image-wrap{
        height: auto;
        position: relative;
        .upload-image{
            width: 150px;
            height: 120px;
            @include border-radius(5px);
            border: 1px dashed $ColorC;
            overflow: hidden;
            position: relative;
            text-align: center;
            line-height: 120px;
            .lab-tip{
                font-size: 12px;
                color: $ColorC;
            }
            .inp-upload{
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                @include opacity(0);
                z-index: 5;
                cursor: pointer;
            }
            .thumb-wrap{
                display: inline-block;
                width: 100%;
                height: 100%;
                position: absolute;
                top: 0;
                left: 0;
                z-index: 4;
            }
            .upload-thumb{
                max-width: 100%;
                max-height: 100%;
                display: inline-block
            }
        }
    }

    .upload-file-wrap{
        // width: 360px;
        // display: inline-block;
        .upload-file{
            $h: 44px;
            height: $h;
            border: 1px solid #ccc;
            position: relative;
            overflow: hidden;
            .opacity-file{
                position: absolute;
                width: 100%;
                height: 100%;
                z-index: 10;
                max-width: 100%;
                @include opacity(0);
            }
            .file-name{
                display: inline-block;
                height: $h;
                line-height: $h - 2px;
                font-size: 12px;
                position: absolute;
                top: 0;
                left: 5px;
                right: 100px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            .btn-file-choose{
                float: right;
                margin: 5px;
            }
        }
        &.min{
            .upload-file{
                $h: 32px;
                height: $h;
                .file-name{
                    height: $h;
                    line-height: $h - 2px;
                }
                .btn-file-choose{
                    float: right;
                    margin: 3px;
                }
            }
        }
    }
    .upload-file-progress-wrap{
        .content-item{
            // min-height: 32px;
            // margin: 10px auto;
            position: relative;
            margin-top: 10px;

            &.full{
                margin-left: -90px;
            }
            .upload-file-inp{
                width: 100%;
                height: 100%;
                position: absolute;
                top: 0;
                left: 0;
                @include opacity(0);
            }
            .upload-file-title{
                height: 32px;
                line-height: 32px;
                text-align: left;
                padding-left: 5px;
                background: $AuxiliaryColor;
                position: relative;
                .btn-del-file{
                    display: inline-block;
                    width: 32px;
                    height: 32px;
                    position: absolute;
                    top: 0;
                    right: 0px;
                    line-height: 32px;
                    color: $PrimaryFontColor;
                    text-decoration: none;
                    outline: none;
                    text-align: center;
                }
            }
            .upload-file-progress{
                min-height: 32px;
                margin-top: 10px;
                .upload-file-name{
                    font-size: 12px;
                    color: $ColorBC;
                }
            }
        }
    }

    .value-text{
        font-size: 12px;
        color: $PrimaryColor;
        display: inline-block;
        margin: 0 10px;
    }

    $labWidth: 70px;
    // 静态，高度自动增长
    &.static, &.upload-file-progress{
        .rows-lab{
            position: absolute;
            top: 0;
            left: 0;
        }
        .rows-inp{
            position: relative;
            display: block;
            margin-left: $labWidth + 10px;
            left: initial;
        }
    }
    &.split-line-row{
        min-height: 11px;
        .split-line{
            display: inline-block;
            width: 110%;
            border-top: 1px solid #d9d9d9;
            margin: 5px auto;
            margin-left: -5%;
        }
    }
    &.column-row-2{
        width: 45%;
        display: inline-block;
        &.right{
            float: right;
        }
    }
    .ant-select:host{
        width: 100%;
    }
    // &.remark{
    //     height: 100px;
    //     border: 1px solid #ccc;  
    //     border-radius: 5px;
    //     line-height: 24px;
    //     overflow: auto;
    // }
    .rows-lab{
        display: inline-block;
        min-width: $labWidth;
        text-align: left;
        height: $rowHeight;
        line-height: $rowHeight;
        &.full{
            width: 100%;
            position: relative;
        }
        &.rows-lab-icon{
            position: relative;
            padding-left: 10px;
            height: 40px;
            border-bottom: 1px solid #ddd;
            margin-bottom: 10px;
            &::after{
                content: '';
                display: inline-block;
                width: 5px;
                height: 18px;
                position: absolute;
                background: #1890ff;
                top: 5px;
                left: 0;
                border-radius: 4px;
            }
        }
    }
    .rows-inp{
        position: absolute;
        min-height: 30px;
        right: 0;
        left: $labWidth + 5px;
        top: 0;
        &.text{
            line-height: 30px;
        }
        &.static{
            position: relative;
            left: initial;
        }
        &.full{
            position: relative;
            left: initial;
            margin-left: 0;
            display: block;
        }
        .value-group-item{
            display: inline-block;
            margin-right: 10px;
        }
        .status-success{
            color: #0059B3;
        }
        .rows-inp-child-group{
            display: inline-block;
            width: 100%;
            margin-bottom: 20px;
        }
        .bold{
            font-size: 16px;
            font-weight: bold;
        }
        .remark{
            font-size: 12px;
            color: #F00;
        }
        .desc{
            font-size: 12px;
            color: #CCC;
        }
        .remark-text{
            @include border-radius(4px);
            padding: 4px 11px;
            font-size: 14px;
            color: rgba(0,0,0,.65);
            background: #FFF;
            border: 1px solid #d9d9d9;
            height: 90px;
            overflow: auto;
            @include scrollbar();
            display: inline-block;
            width: 100%;
        }
        a{
            margin-right: 8px;
        }
    }
    input{
        display: inline-block;
        width: 100%;
        // max-width: 360px;
        &.max{
            max-width: 360px;
        }
    }
    textarea{
        resize: none;
    }
    .require{
        display: inline-block;
        position: absolute;
        height: 30px;
        line-height: 30px;
        color: #F00;
        top: 0px;
        right: -10px;
        &.static{
            position: relative;
        }
    }
}